Repository navigation
Embed native Server 3.12.0 in the development Server - #165
Merged
Merged
Conversation
Move the built-in development Server to the published Server 3.12.0 tag commit da655a85, so `dw server:start-dev` advertises capabilities.workflow_version_usage for `dw workflow:version-usage`. Server 3.12.0 uses native schema 15 and its startup refuses an earlier schema with native_schema_upgrade_required. The development Server holds its own data directory exclusively, so when it finds an earlier upgradable schema there it now runs the Server's own schema_upgrade::upgrade_sqlite on that database, prints the versions, and starts. A newer schema still refuses, now with a message that says what to do. Tests start a data directory written by the published CLI 2.9.0 binary (schema 14, with one started workflow), and a schema-99 marker. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
General review of head
The one-way upgrade (2.9.0 can't reopen an upgraded dev directory) goes in the 2.10.0 release notes. Merging when hosted checks pass. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
[patch.crates-io]sources) from3d90086fto the published Server 3.12.0 tag commitda655a8500691d6ce8e018d1552801491a696135.Cargo.lockchanges only those four sources (plus the test-onlyminiz_oxidedev-dependency, which was already in the graph).dw server:start-devnow advertisescapabilities.workflow_version_usage, sodw workflow:version-usage(Show legacy and unknown workflow version usage #158) works against the built-in Server.Existing development data
Server 3.12.0 uses native SQLite schema 15. On a schema-14 database (written by CLI 2.9.0),
Runtime::openchecks it read-only and refuses withnative_schema_upgrade_requiredwithout writing anything. Native startup never upgrades.The development Server holds its own data directory exclusively under its lock. So when
Runtime::openrefuses withnative_schema_upgrade_required, start-dev:runtime::schema_upgrade::upgrade_sqlite("database.sqlite"). This is the same upgradeschema-upgraderuns: an exact recognition check, then oneBEGIN IMMEDIATEtransaction,Upgraded the development database from schema 14 to 15.,It never touches a database outside its data directory. A schema newer than the binary still refuses, and the message now says what to do (
native_schema_newer_than_binary). The README's start-dev section notes both behaviors.Tests
workflow_version_usage: trueand an emptyworkflow:version-usageresult.cargo fmt --check,cargo clippy --locked --all-targets -D warningsandcargo test --lockedpass (343 passed, 0 failed, 2 ignored).cargo build --lockedandscripts/ci/smoke-native-dev.pyalso pass.🤖 Generated with Claude Code